package top.anonyeast.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import top.anonyeast.pojo.User;

import java.util.List;

@Repository //声明这是持久层并交给Spring管理
//在对应的Mapper上继承基本的类BaseMapper
public interface UserMapper extends BaseMapper<User> {
    //所有的CRUD操作都已经编写完成
    //不需要像以前那样配置一大堆文件了

    @Select("select * from user")
    public List<User> findAll();
}
